import request from '@/utils/request'

export default {
    //1.专辑列表，带条件查询和分页的
    getAlbumListPage(current, limit, albumQuery) {
        return request({
            url: `api/admin/album/pageAlbumCondition/${current}/${limit}`,
            method: 'post',
            data: albumQuery
        })
    },
    //2.删除专辑
    deleteAlbumById(id) {
        return request({
            url: `api/admin/album/${id}`,
            method: 'delete'
        })
    },
    //3.添加专辑
    addAlbum(album) {
        return request({
            url: `api/admin/album/addAlbum`,
            method: 'post',
            data: album
        })
    },
    //4.根据ID查询专辑
    getAlbumById(id){
        return request({
            url:`api/admin/album/album/${id}`,
            method:'get'
        })
    },
    //5.修改专辑
    updateAlbum(album){
        return request({
            url:`api/admin/album/updateAlbum`,
            method:'post',
            data:album
        })

    },
    //6.修改专辑上线状态
    modifiyOnline(id,state){
        return request({
            url:`api/admin/album/online/${id}/${state}`,
            method:'get'
        })

    },
    //7.获得所有专辑
    getAllAlbum(){
        return request({
            url:`/api/admin/album/all`
        })
    }

}
